package org.suze.springboot.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.suze.springboot.interceptor.SessionInterceptor;
import org.suze.springboot.interceptor.TimerInterceptor;

/**
 * @description:
 * @Date : 下午7:17 2017/9/18
 * @Author : 石冬冬-Heil Hitler(dongdong.shi@mljr.com)
 */

@Configuration
@EnableWebMvc
@ComponentScan(basePackages = {"org.suze"})
public class WebApplicationConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new SessionInterceptor());
        registry.addInterceptor(new TimerInterceptor());
    }
}
